package com.iflytek.elpmobile.utils.network;

import com.iflytek.elpmobile.utils.StringUtils;
import com.simple.elpmobile.utils.network.model.NetworkStatus;
import com.simple.elpmobile.utils.network.model.NetworkStatusReason;


public class TaskInfo 
{
	private long mStartTime;
	
	private int mProcess;
	private String mResult;
	private NetworkStatus mNetworkStatus;
	private NetworkStatusReason mNetworkReason;
	
	public TaskInfo(long startTime)
	{
		mStartTime = startTime;
	}
	
	public long getStartTime() { return System.currentTimeMillis() - mStartTime; }
	
	public int getProcess() 				{ return mProcess; }
	public String getResult()				{ return mResult;}
	public NetworkStatus getStatus() 		{ return mNetworkStatus; }
	public NetworkStatusReason getReason() 	{ return mNetworkReason; }
	public boolean isEmpty()				{ return StringUtils.isEmpty(mResult); }
	
	public void setResult(String result)		{ mResult = result; }
	public void setProcess(int process) 		{ mProcess = process; }	
	public void setStatus(NetworkStatus status) { mNetworkStatus = status; }
	public void setReason(NetworkStatusReason reason) 	{ mNetworkReason = reason; }
}
